<template>
	<view class="content">
		<view class="header">
			<view :style="{height: systemBarHeight + 'px'}">
			</view>
			<view class="navbar">
				<image src="/static/xy/fh.png" mode="" @click="fh()"></image>
				<text>学员信息</text>
			</view>
		</view>

		<view class="user">
			<view class="user_t">
				<view class="user_img">
					<image src="/static/logo.png" mode=""></image>
				</view>
				<view class="user_km">
					<text>当前状态：科目三</text>
				</view>
			</view>
			<view class="user_name">
				<text>王小明</text>
				<image src="/static/jl/nan.png" mode="" v-if="sex==0"></image>
				<image src="/static/jl/nv.png" mode="" v-if="sex==1"></image>
			</view>
			<view class="user_phone">
				<view class="phone1">
					<image src="/static/jl/dianhua.png" mode=""></image>
					<text>155012345678</text>
				</view>
				<view class="shu">
					
				</view>
				<view class="phone1">
					<image src="/static/jl/shenfenzheng.png" mode=""></image>
					<text>155012345678</text>
				</view>
			</view>

			<view class="user_type">
				<view class="user_type_item">
					<text class="type1">加入时间</text>
					<text class="type2">2025-01-01</text>
				</view>
				<view class="user_type_item">
					<text class="type1">介绍人</text>
					<text class="type2">办公室</text>
				</view>
				<view class="user_type_item">
					<text class="type1">科目二课时</text>
					<text class="type2">25h</text>
				</view>
				<view class="user_type_item">
					<text class="type1">科目三课时</text>
					<text class="type2">20h</text>
				</view>
			</view>
		</view>

		<view class="tabs">

			<view class="tabs_item" v-for="(item,index) in tabsList" :key="index" @click="tabchange(index)">
				<text
					:style="{color:current==index?'#43484D':'',fontWeight:current==index?'bold':''}">{{item.name}}</text>
				<image v-if="current==index" src="/static/jl/tab.png" mode=""></image>
			</view>
		</view>

		<view class="period" v-if="current==0">
			<view class="period_item" v-for="(item,index) in periodList" :key="index">
				<view class="period_tit">
					<text>{{item.name}}</text>
				</view>
				<view class="period_date">
					<image src="/static/xy/shijian.png" mode=""></image>
					<text>2025-01-01 10:00 至 2025-01-01 10:00</text>
				</view>
			</view>
		</view>

		<view class="exam" v-if="current==1">
			<view class="exam_item" v-for="(item,index) in examList" :key="index">
				<view class="exam_tit">
					<text>{{item.name}}</text>
				</view>

				<view class="exam_date">
					<view class="exam_date_lf">
						<image src="/static/xy/shijian.png" mode=""></image>
						<text>2025-01-01 10:00</text>
					</view>
					<view class="exam_date_rg">
						<text class="hg1" v-if="item.starts==false">合格</text>
						<text class="hg2" v-if="item.starts==true">不合格</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				systemBarHeight: 0,
				sex: 0,
				current: 1,
				tabsList: [{
						name: '课时记录'
					},
					{
						name: '考试记录'
					}
				],
				periodList: [{
						name: '科目二'
					},
					{
						name: '科目二'
					},
					{
						name: '科目二'
					}
				],

				examList: [{
						name: '科目二',
						starts: false
					},
					{
						name: '科目二',
						starts: true
					},
					{
						name: '科目二',
						starts: false
					}
				]
			}
		},
		mounted() {
			/* 手机顶部高度 */
			this.getSysteminfo()
		},
		methods: {
			/* 手机顶部高度 */
			getSysteminfo() {
				uni.getSystemInfo({
					success: res => {
						this.systemBarHeight = res.statusBarHeight;
					}
				});
			},
			fh() {
				uni.navigateBack({
					delta: 1
				})
			},
			tabchange(index) {
				this.current = index
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		width: 750rpx;
		height: 1624rpx;
		background: linear-gradient(180deg, #53DDA8 20%, #FEFEFE 32%), #FFFFFF;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.navbar {
		height: 88rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		position: relative;

		>image {
			width: 48rpx;
			height: 48rpx;
			position: absolute;
			left: 32rpx;
		}

		>text {
			font-family: PingFang SC, PingFang SC;
			font-weight: 600;
			font-size: 34rpx;
			color: #43484D;
		}
	}

	.user {
		width: 93%;
		margin: 128rpx auto 0;
		padding-bottom: 40rpx;
		background: #FFFFFF;
		box-shadow: 0rpx 8rpx 24rpx 0rpx rgba(131, 131, 131, 0.25);
		border-radius: 16rpx 16rpx 16rpx 16rpx;

		.user_t {
			height: 132rpx;
			display: flex;

			.user_img {
				margin-left: 56rpx;

				>image {
					width: 132rpx;
					height: 132rpx;
					border-radius: 66rpx;
					margin-top: -52rpx;
				}
			}

			.user_km {
				width: 240rpx;
				height: 44rpx;
				margin-top: auto;
				margin-left: 200rpx;
				margin-bottom: 52rpx;
				border-radius: 94rpx 94rpx 94rpx 94rpx;
				border: 2rpx solid #43484D;
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 24rpx;
				color: #43484D;
				display: flex;
				align-items: center;
				justify-content: center;
			}
		}

		.user_name {
			width: 93%;
			margin: -28rpx auto 0;
			display: flex;
			align-items: center;

			>text {
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 32rpx;
				color: #43484D;
			}

			>image {
				width: 32rpx;
				height: 32rpx;
				margin-left: 8rpx;
			}
		}

		.user_phone {
			width: 93%;
		    margin: 14rpx auto 0;
			display: flex;
			align-items: center;
			.phone1{
				display: flex;align-items: center;
				>image{
					width: 32rpx;
					height: 32rpx;
				}
				>text{
					font-family: PingFang SC, PingFang SC;
					font-weight: 400;
					font-size: 26rpx;
					color: #9A9A9A;
					margin-left: 8rpx;
				}
			}
			.shu{
				width: 0rpx;
				height: 24rpx;
				border: 2rpx solid #9A9A9A;
				margin-left: 32rpx;
				margin-right: 32rpx;
			}
		}

		.user_type {
			width: 93%;
			margin: 36rpx auto 0;
			display: flex;
			flex-wrap: wrap;

			.user_type_item {
				width: 50%;
				margin-bottom: 20rpx;
				display: flex;
				align-items: center;

				.type1 {
					font-family: PingFang SC, PingFang SC;
					font-weight: 400;
					font-size: 24rpx;
					color: #9D9D9D;
				}

				.type2 {
					font-family: DIN, DIN;
					font-weight: 500;
					font-size: 32rpx;
					color: #43484D;
					margin-left: 8rpx;
				}
			}
		}
	}

	.tabs {
		display: flex;
		width: 50%;
		margin: 40rpx auto 0;
		display: flex;
		justify-content: space-between;

		.tabs_item {
			display: flex;
			flex-direction: column;

			>text {
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 34rpx;
				color: #C5C5C5;

			}

			>image {
				width: 23rpx;
				height: 8rpx;
				margin: 8rpx auto 0;
			}
		}
	}

	.period {
		width: 93%;
		padding-bottom: 32rpx;
		margin: 24rpx auto 0;
		background: #F8F8F8;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		padding-top: 32rpx;

		.period_item {
			width: 90%;
			margin: 0 auto 32rpx;
			border-bottom: 2rpx solid rgba(0, 0, 0, 0.05);

			.period_tit {
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 34rpx;
				color: #43484D;
			}

			.period_date {
				display: flex;
				align-items: center;
				margin-top: 8rpx;
				padding-bottom: 32rpx;
				height: 32rpx;

				>image {
					width: 32rpx;
					height: 32rpx;
					margin-left: 16rpx;
				}

				>text {
					height: 32rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: 400;
					font-size: 28rpx;
					color: #43484D;
					margin-left: 16rpx;
				}
			}
		}
	}

	.exam {
		width: 93%;
		padding-bottom: 32rpx;
		margin: 24rpx auto 0;
		background: #F8F8F8;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		padding-top: 32rpx;

		.exam_item {
			width: 90%;
			margin: 0 auto 32rpx;
			border-bottom: 2rpx solid rgba(0, 0, 0, 0.05);

			.exam_tit {
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 34rpx;
				color: #43484D;
			}

			.exam_date {
				display: flex;
				align-items: center;

				padding-bottom: 32rpx;
				justify-content: space-between;

				.exam_date_lf {
					display: flex;
					align-items: center;

					>image {
						width: 32rpx;
						height: 32rpx;
						margin-left: 16rpx;
					}

					>text {
						height: 32rpx;
						font-family: PingFang SC, PingFang SC;
						font-weight: 400;
						font-size: 28rpx;
						color: #43484D;
						margin-left: 16rpx;
					}
				}

				.exam_date_rg {
					margin-right: 16rpx;

					.hg1 {
						font-family: PingFang SC, PingFang SC;
						font-weight: 500;
						font-size: 34rpx;
						color: #21D691;
					}

					.hg2 {
						font-family: PingFang SC, PingFang SC;
						font-weight: 500;
						font-size: 34rpx;
						color: #FB4747;
					}
				}
			}
		}
	}
</style>